Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: code style simplify #6241

Merged
merged 1 commit into from
Jul 12, 2023
Merged

chore: code style simplify #6241

merged 1 commit into from
Jul 12, 2023

Conversation

1587315093
Copy link
Contributor

@1587315093 1587315093 commented Jul 10, 2023

把 if 语法风格统一了一下,只有一行代码的省略了花括号

删了一些时间久的注释属性

简化了一下箭头函数的 return

@github-actions
Copy link
Contributor

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6241.surge.sh

@zombieJ
Copy link
Member

zombieJ commented Jul 12, 2023

if 的不要挪掉哈,这样会让覆盖率看起来很高实际上代码没跑到。箭头函数优化可以留~

if (Array.isArray(value)) {
return value
}
if (Array.isArray(value)) return value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的写法是更好的格式。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗦嘎~

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 90.00% and project coverage change: +0.27 🎉

Comparison is base (2a78b4b) 90.75% compared to head (716a9db) 91.03%.

Additional details and impacted files
@@             Coverage Diff             @@
##           feature    #6241      +/-   ##
===========================================
+ Coverage    90.75%   91.03%   +0.27%     
===========================================
  Files          305      305              
  Lines         6601     6583      -18     
  Branches      1644     1643       -1     
===========================================
+ Hits          5991     5993       +2     
+ Misses         562      544      -18     
+ Partials        48       46       -2     
Impacted Files Coverage Δ
src/components/dropdown/dropdown.tsx 86.44% <ø> (ø)
src/components/form/form-array.tsx 26.66% <ø> (ø)
src/components/popover/popover.tsx 92.85% <0.00%> (+1.30%) ⬆️
...c/components/date-picker/date-picker-date-utils.ts 90.90% <83.33%> (+0.39%) ⬆️
src/components/capsule-tabs/capsule-tabs.tsx 97.91% <100.00%> (+1.99%) ⬆️
...c/components/date-picker-view/date-picker-view.tsx 100.00% <100.00%> (+60.00%) ⬆️
...c/components/date-picker/date-picker-week-utils.ts 93.05% <100.00%> (-0.28%) ⬇️
src/components/footer/footer.tsx 100.00% <100.00%> (ø)
src/components/image-uploader/image-uploader.tsx 93.89% <100.00%> (-0.05%) ⬇️
src/components/modal/modal.tsx 100.00% <100.00%> (ø)
... and 4 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@1587315093
Copy link
Contributor Author

将 if 语句的修改的去掉了

保留了函数的那些

@afc163 @zombieJ

@1587315093 1587315093 changed the title refactor: judgment grammar simplification chore: code style simplify Jul 12, 2023
@1587315093 1587315093 requested a review from afc163 July 12, 2023 07:39
@afc163 afc163 merged commit ae1f895 into ant-design:feature Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants